package com.candy.shopproduct.service.impl;
import com.candy.entity.Product;
import com.candy.shopproduct.dao.ProductMapper;
import com.candy.shopproduct.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    ProductMapper productMapper;

    @Override
    public Product getProductById(Integer id) {
        return productMapper.selectByPrimaryKey(id);
    }

    @Override
    public int eidtProductStock(Integer pid) {
        return productMapper.updateStock(pid);
    }
}
